<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
    <title>背景图 background-size 效果</title>
    <link rel="stylesheet" href="./src/css/common.css">
    <style>
        .container {
            background-color: #b3d4fc;
            overflow: auto;
        }
        .flex-box .img {
            width: 100px;
            height: 100px;
            background-color: #f5f2f0;
            background-position: center center;
            background-repeat: no-repeat;
            margin-right: 15px;
        }
        .row-1 .flex-box .img {
            background-size: contain;
        }
        .row-2 .flex-box .img {
            background-size: cover;
        }
        .row-3 .flex-box .img {
            background-size: 100% auto;
        }
        .row-4 .flex-box .img {
            background-size: auto 100%;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="row-box row-1">
        <div class="title">
            <span>background-size: contain; </span>
        </div>
        <div class="flex-box">
            <div class="img" style="background-image: url('../static/src/image/css.jpg')"></div>
            <div class="img" style="background-image: url('../static/src/image/nginx.png')"></div>
            <div class="img" style="background-image: url('../static/src/image/tmp.jpg')"></div>
        </div>
    </div>
    <div class="row-box row-2">
        <div class="title">
            <span>background-size: cover; </span>
        </div>
        <div class="flex-box">
            <div class="img" style="background-image: url('../static/src/image/css.jpg')"></div>
            <div class="img" style="background-image: url('../static/src/image/nginx.png')"></div>
            <div class="img" style="background-image: url('../static/src/image/tmp.jpg')"></div>
        </div>
    </div>
    <div class="row-box row-3">
        <div class="title">
            <span>background-size: 100% auto; </span>
        </div>
        <div class="flex-box">
            <div class="img" style="background-image: url('../static/src/image/css.jpg')"></div>
            <div class="img" style="background-image: url('../static/src/image/nginx.png')"></div>
            <div class="img" style="background-image: url('../static/src/image/tmp.jpg')"></div>
        </div>
    </div>
    <div class="row-box row-4">
        <div class="title">
            <span>background-size: auto 100% ; </span>
        </div>
        <div class="flex-box">
            <div class="img" style="background-image: url('../static/src/image/css.jpg')"></div>
            <div class="img" style="background-image: url('../static/src/image/nginx.png')"></div>
            <div class="img" style="background-image: url('../static/src/image/tmp.jpg')"></div>
        </div>
    </div>
</div>

<script>


</script>
</body>
</html>